import java.awt.event.*;
import java.awt.*;
/**
 * La clase EditorMode establece componentes para la edición de 
 * gran parte de los datos  de la maquina, así como los archivos de
 * los programas.
 */
public class EditorMode extends Mode
{
    public EditorMode()
    {
        super(
            "editorMode", 
            KbdCmdId.CmdValue.MODE_EDITOR
        );
    }
    public void setDescriptionViewPanel()
    {
        addTopPanels(
            "operationMode",
            Mode.Place.NORTH,
            new GridBagConstraints(
                0,
                0,
                1,
                1,
                1,
                1,
                GridBagConstraints.CENTER,
                GridBagConstraints.BOTH,
                new Insets(0, 0, 0, 0),
                0,
                0
            ),
            new Data.Id[] {
                Data.Id.OPERATION_MODE
            },
            null
        );
        addTopPanels(
            "editorMode",
            Mode.Place.CENTER,
            new GridBagConstraints(
                0,
                0,
                1,
                1,
                1,
                1,
                GridBagConstraints.CENTER,
                GridBagConstraints.BOTH,
                new Insets(0, 0, 0, 0),
                0,
                0
            ),
            new Data.Id[] {
                Data.Id.OTHER
            },
            new AnotherComponent[] {
                AnotherComponent.EDITOR_AREA}
        );
    }
    public void setDescriptionEditablePanel()
    {
        addBottomPanels(
            "axisMotion",
            Mode.Place.CENTER,
            new Data.Id[] {
                Data.Id.CUTTING_DATA_EDITOR,
                Data.Id.JOG_DATA_EDITOR,
                Data.Id.RTR_DATA_EDITOR,
                Data.Id.ZRTR_DATA_EDITOR,
                Data.Id.AXIS_MOTION_TRAVEL_RANGE,
                Data.Id.AXIS_REFERENCE_POINT_RETURN_DIRECTION
            },
            null,
            new GridLayout(3,2)
        );
        addBottomPanels(
            "spindle",
            Mode.Place.CENTER,
            new Data.Id[] {
                Data.Id.SPINDLE
            },
            null,
            null//new FlowLayout()
        );
        addBottomPanels(
            "tool",
            Mode.Place.CENTER,
            new Data.Id[] {
                Data.Id.TOOL_MAGAZINE_CAPACITY,
                Data.Id.OTHER,
                Data.Id.MAXIMUM_TOOL_INDEX,
                Data.Id.OTHER,
                Data.Id.TOOL_SELECTION_TYPE,
                Data.Id.OTHER,
                Data.Id.SELECTED_TOOL_INDEX,
                Data.Id.OTHER
            },
            new AnotherComponent[] {
                AnotherComponent.PANEL,
                AnotherComponent.PANEL,
                AnotherComponent.PANEL,
                AnotherComponent.PANEL
            },
            new GridLayout(4,2)
        );
        addBottomPanels(
            "toolHolder",
            Mode.Place.CENTER,
            new Data.Id[] {
                Data.Id.TOOL_HOLDER_DATA_EDITOR
            },
            null,
            null//new FlowLayout()
        );
        addBottomPanels(
            "taskbar",
            Mode.Place.SOUTH,
            new Data.Id[] {
                Data.Id.OTHER
            },
            new AnotherComponent[] {
                AnotherComponent.TASKBAR
            },
            new GridLayout(1,1)
        );
        addBottomPanels(
            "pathPlanning",
            Mode.Place.CENTER,
            new Data.Id[] {
                Data.Id.OTHER,
                Data.Id.DEFAULT_METRIC_SYSTEM,
                Data.Id.DEFAULT_DIMENSIONING_MODE,
                Data.Id.OTHER,
                Data.Id.OTHER,
                Data.Id.OTHER,
                Data.Id.OTHER,
                Data.Id.OTHER
            },
            new AnotherComponent[] {
                AnotherComponent.PANEL,
                AnotherComponent.PANEL,
                AnotherComponent.PANEL,
                AnotherComponent.PANEL,
                AnotherComponent.PANEL,
                AnotherComponent.PANEL
            },
            new GridLayout(2,4)
        );
        addBottomPanels(
            "changeDialog",
            Mode.Place.EAST,
            new Data.Id[] {
                Data.Id.OTHER
            },
            new AnotherComponent[] {
                AnotherComponent.VALIDATE_CHANGE
            },
            new GridLayout(1,1)
        );
    }
}
